package com.ktwlsoft.archivemanage.domain.business.repositoryService.guiBusiness;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.ktwlsoft.archivemanage.payload.guiBusiness.MendListGetDetailsResult;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.guiBusiness.IGuiGuidanceMendListMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.guiBusiness.GuiGuidanceMendList;

/**
 * gui_guidance_mend_list--业务指导整改业务层接口实现类
 *
 * @author zhuhe on 2020-04-28 17:58:06
 * @version 1.0
 */
@Service
public class GuiGuidanceMendListRepositoryService {
	
	private final IGuiGuidanceMendListMapper guiGuidanceMendListMapper;

	public GuiGuidanceMendListRepositoryService(IGuiGuidanceMendListMapper guiGuidanceMendListMapper) {
		this.guiGuidanceMendListMapper = guiGuidanceMendListMapper;
	}

	/**
 	 * 查询分页 on 2020-04-28 17:58:06
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param guiGuidanceMendList guiGuidanceMendList
 	 * @return PageInfo<GuiGuidanceMendList>
 	 */
	public PageInfo<GuiGuidanceMendList> findPage(int pn,int pageSize,GuiGuidanceMendList guiGuidanceMendList) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<GuiGuidanceMendList> pageInfo = new PageInfo<GuiGuidanceMendList>(guiGuidanceMendListMapper.findList(guiGuidanceMendList));
		return pageInfo;
	}

	/**
	  * 查询分页 on 2020/4/29 16:22
	  *
	  * @param jsonObject jsonObject
	  * @return PageInfo<GuiGuidanceMendList>
	  */
	public PageInfo<JSONObject> dataFindPage(int pn,int pageSize,JSONObject jsonObject) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<JSONObject> pageInfo = new PageInfo<JSONObject>(guiGuidanceMendListMapper.dataFindPage(jsonObject));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-04-28 17:58:06
	 * @param guiGuidanceMendList guiGuidanceMendList
	 * @return List<GuiGuidanceMendList>
	 */
	public List<GuiGuidanceMendList> findList(GuiGuidanceMendList guiGuidanceMendList) {
		return guiGuidanceMendListMapper.findList(guiGuidanceMendList);
	}

    /**
	 * 根据ID查询信息 on 2020-04-28 17:58:06
	 * @param id	主键
	 * @return GuiGuidanceMendList
	 */
	public GuiGuidanceMendList getById(Long id){
		return guiGuidanceMendListMapper.getById(id);
	}

	/**
	 * 根据ID查询信息 on 2020-04-28 17:58:06
	 * @param id	主键
	 * @return GuiGuidanceMendList
	 */
	public MendListGetDetailsResult getDetails(Long id){
		return guiGuidanceMendListMapper.getDetails(id);
	}

	/**
	 * 根据业务指导ID查询信息 on 2020-04-28 17:58:06
	 * @param guidanceId	业务指导ID
	 * @return GuiGuidanceMendList
	 */
	public GuiGuidanceMendList getByGuidanceId(Long guidanceId){
		return guiGuidanceMendListMapper.getByGuidanceId(guidanceId);
	}

   /**
	 * 新增 on 2020-04-28 17:58:06
	 * @param guiGuidanceMendList guiGuidanceMendList
	 * @return int
	 */
	public int insert(GuiGuidanceMendList guiGuidanceMendList){
		return guiGuidanceMendListMapper.insert(guiGuidanceMendList);
	}

	/**
	 * 批量插入 2020-04-28 17:58:06
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<GuiGuidanceMendList> list){
	    return guiGuidanceMendListMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-04-28 17:58:06
	 * @param guiGuidanceMendList guiGuidanceMendList
	 * @return int
	 */
	public int update(GuiGuidanceMendList guiGuidanceMendList){
		return guiGuidanceMendListMapper.update(guiGuidanceMendList);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-04-28 17:58:06
	 * @param guiGuidanceMendListArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guiGuidanceMendListArr){
		return guiGuidanceMendListMapper.deleteByIds(guiGuidanceMendListArr);
	}

   /**
	 * 根据id删除信息 on 2020-04-28 17:58:06
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return guiGuidanceMendListMapper.deleteById(id);
	}

	/**
	  * 指导整改未提交提醒 on 2020/4/30 10:17
	  *
	  * @param notifyPeriod 指定时间
	  * @param date 当前时间
	  * @return List<MendList>
	  */
	public List<GuiGuidanceMendList> findMendListBefore(Long notifyPeriod, Date date) {
		return guiGuidanceMendListMapper.findMendListBefore(notifyPeriod,date);
	}
}
